package ch.elektroplan.mueller.passwordSave.presentation.onClicklisteners;

import android.app.Dialog;
import android.content.Context;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;

public class ShowPasswordListener implements OnClickListener {
	
	private Context context;
	private TextView message;
	private Dialog dialog;
	
	public ShowPasswordListener(Context context,String password){
		this.context = context;
		this.message = new TextView(context);
		this.message.setText("  "+password);
		
		this.dialog = setUpDialog(this.message);
		
		
	}

	private Dialog setUpDialog(TextView message2) {
				
		Dialog dialog = new Dialog(context);
		
		dialog.setTitle("Password:");
		dialog.setCancelable(true);
		dialog.closeOptionsMenu();
		dialog.setContentView(message2);
		
		return dialog;
	}

	public void onClick(View v) {

		
		this.dialog.show();
		
	}

}
